package cn.chinaflame.pagodas.entity;

import java.math.BigDecimal;
import java.util.Objects;
import javax.persistence.*;
/**
 * @author created by lbq
 * @date 2018年1月4日 下午2:31:09
 **/
@Entity
@Table(name = "yw_item", schema = "pagoda", catalog = "")
public class YwItem {
    private String id;
    private String name;
    private String provinceCode;
    private String cityCode;
    private String areaCode;
    private String description;
    private String projectId;
    private String agentId;
    private String agentName;
    private BigDecimal commission;
    private String state;
    private String createtime;
    private String updatetime;

    @Id
    @Column(name = "id", nullable = false, length = 20)
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @Basic
    @Column(name = "agent_name", nullable = true, length = 50)
    public String getAgentName() {
        return agentName;
    }

    public void setAgentName(String agentName) {
        this.agentName = agentName;
    }

    @Basic
    @Column(name = "commission", nullable = true)
    public BigDecimal getCommission() {
        return commission;
    }

    public void setCommission(BigDecimal commission) {
        this.commission = commission;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 30)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "province_code", nullable = true, length = 10)
    public String getProvinceCode() {
        return provinceCode;
    }

    public void setProvinceCode(String provinceCode) {
        this.provinceCode = provinceCode;
    }

    @Basic
    @Column(name = "city_code", nullable = true, length = 10)
    public String getCityCode() {
        return cityCode;
    }

    public void setCityCode(String cityCode) {
        this.cityCode = cityCode;
    }

    @Basic
    @Column(name = "area_code", nullable = true, length = 10)
    public String getAreaCode() {
        return areaCode;
    }

    public void setAreaCode(String areaCode) {
        this.areaCode = areaCode;
    }

    @Basic
    @Column(name = "description", nullable = true, length = 50)
    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    @Basic
    @Column(name = "project_id", nullable = true, length = 50)
    public String getProjectId() {
        return projectId;
    }

    public void setProjectId(String projectId) {
        this.projectId = projectId;
    }

    @Basic
    @Column(name = "agent_id", nullable = true, length = 20)
    public String getAgentId() {
        return agentId;
    }

    public void setAgentId(String agentId) {
        this.agentId = agentId;
    }

    @Basic
    @Column(name = "state", nullable = true, length = 1)
    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state;
    }

    @Basic
    @Column(name = "createtime", nullable = true)
    public String getCreatetime() {
        return createtime;
    }

    public void setCreatetime(String createtime) {
        this.createtime = createtime;
    }

    @Basic
    @Column(name = "updatetime", nullable = true)
    public String getUpdatetime() {
        return updatetime;
    }

    public void setUpdatetime(String updatetime) {
        this.updatetime = updatetime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        YwItem ywItem = (YwItem) o;
        return Objects.equals(id, ywItem.id) &&
                Objects.equals(name, ywItem.name) &&
                Objects.equals(provinceCode, ywItem.provinceCode) &&
                Objects.equals(cityCode, ywItem.cityCode) &&
                Objects.equals(areaCode, ywItem.areaCode) &&
                Objects.equals(description, ywItem.description) &&
                Objects.equals(agentId, ywItem.agentId) &&
                Objects.equals(state, ywItem.state) &&
                Objects.equals(createtime, ywItem.createtime) &&
                Objects.equals(updatetime, ywItem.updatetime);
    }

    @Override
    public int hashCode() {

        return Objects.hash(id, name, provinceCode, cityCode, areaCode, description, agentId, state, createtime, updatetime);
    }
}
